# -*- coding:utf-8 -*-

dict01 = {"a": 1, "b": 2, "c": 3}
dict02 = {"e": 1, "b": 2, "f": 3}
dict03 = {"h": 1, "b": 2, "m": 3}
# 方法1
for i in dict01:
    if i in dict02 and i in dict03:
        print(i)
# 方法2
keys01 = dict01.keys()
print(keys01)
keys02 = dict02.keys()
print(keys02)
res = keys01 & keys02
print(res)
# 方法3
from functools import reduce

res = reduce(lambda x, y: x & y, map(dict.keys, [dict01, dict02, dict03]))
print(list(res))
